home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Shaders / RCShaders / RCMetal.sl < prev    next >
Encoding:
Text File  |  1995-03-22  |  273 b   |  18 lines

  1.  
  2. /*
  3.  *  metal(): give a surface a metallic appearance
  4.  */
  5. surface
  6. RCMetal (
  7.     float    Ka        = 1, 
  8.         Ks        = 1, 
  9.         roughness    = .25)
  10. {
  11.     point Nf = faceforward(normalize(N), I);
  12.     point V = normalize(-I);
  13.     
  14.     Oi = Os;
  15.     Ci = Os * Cs * ( Ka*ambient() + Ks*specular(Nf,V,roughness) );
  16. }
  17.  
  18.